Primitives added in 4.0.6.3

<#5935#><#5935#>
<#1612#>cblob<#1612#> <#1613#>thresh st r<#1613#> #math150##tex2html_wrap_inline5937# <#1615#>sutface<#1615#> [<#1616#>st r<#1616#> #math151##tex2html_wrap_inline5939# <#1618#>surface<#1618#> ...]
Creates a multicolored blob. The syntax is the same as for a blob, with an additional surface definition for each metaball.

The <#526#>cblob<#526#> primitive was provided by George McGregor
<#527#>;SPMlt;mcgregor@ncifcrf.gov;SPMgt;<#527#>

<#5940#><#5940#>
<#1621#>flame<#1621#> <#1622#>size<#1622#> #math152##tex2html_wrap_inline5942# <#1624#>lightswitch speed<#1624#>
Creates a flame at the given position of the given size. The <#533#>lightswitch<#533#> option allows light sources to automatically be placed inside the flame (1) or no lights for faster runs (0). The <#534#>speed<#534#> setting is used for animation and controlls how fast the flame appears to ``move'' upward. A value of 0.5 is suggested as a starting point.

The <#536#>flame<#536#> primitive was provided by Reto Mani <#537#>;SPMlt;mani@iam.unibe.ch;SPMgt;<#537#>

<#5943#><#5943#>
<#1627#>fracland<#1627#> <#1628#>seed subdiv<#1628#>
This primitive creates a fractal surface centered at x = 0.5, y = 0.5 and ranging from x = 0.0, y = 0.0 to x = 1.0, y = 1.0. It is actually a heightfield primitive that is generated within rayshade rather than being read in from a file.

The <#542#>seed<#542#> value is the seed for the random number function. The seed value specifies the shape of the surface -- changing the seed value will randomly change the surface shape.

The <#543#>subdiv<#543#> value is the number of subdivisions for the surface -- #math153##tex2html_wrap_inline5951# = 0 will produce a flat square, #math154#subdiv ;SPMgt; 0 will produce a square with an ever more detailed surface. So far, rayshade seems to have trouble with subdivisions greater than eight (if anyone finds otherwise please tell me!!) and produces surfaces with ;SPMquot;holes;SPMquot; in it for values greater than this.

The number of points in the surface follows the following formulas, where <#545#>Size<#545#> is the total points per side of the object:

#math155#

Size = (2subdiv) + 1

#math156#

TotalPoints = Size2

The four corner points will always have an altitude of zero, the maximum altitude should never be never be more 1.0 and the min should never be less than -1.0.

The <#546#>fracland<#546#> primitive was provided by Larry Coffin
<#547#>;SPMlt;lcoffin@clciris.chem.umr.edu;SPMgt;<#547#>

<#5955#><#5955#>
<#1631#>rotspline<#1631#> #math157##tex2html_wrap_inline5957# #math158##tex2html_wrap_inline5959# <#1634#>coeffs<#1634#> c3 c2 c1 c0
Creates a solid of revolution. This primitive can be defined in two ways.

<#5964#><#5964#>
<#1637#>rotspline<#1637#> #math159##tex2html_wrap_inline5966# rbase gbase #math160##tex2html_wrap_inline5970# rapex gapex

The curve that is rotated is of the form

#math161#

r2 = c3x3 + c2x2 + c1x + c0

#math162##tex2html_wrap_inline5975# is the position of the center of one end and #math163##tex2html_wrap_inline5977# is the center of the other. The word <#565#>coeffs<#565#> must be included in the first method. rbase and rapex are the radii of the base and apex, and gbase and gapex are the gradients.

The <#570#>rotspline<#570#> primitive was provided by Gerald Iles
<#571#>;SPMlt;ilesg@p4.cs.man.ac.uk;SPMgt;<#571#>

<#5982#><#5982#>
<#1646#>sweptsph<#1646#> <#1647#>bezier<#1647#> #math164##tex2html_wrap_inline5984# #math165##tex2html_wrap_inline5986# #math166##tex2html_wrap_inline5988# #math167##tex2html_wrap_inline5990# r0 r1 r2 r3
This primitive is defined as a sphere of varying radius swept, or extruded along a path in space. The path is defined in one of several ways. The path can either be defined as four points which define a bezier path, where the path passes through the first and last endpoints with the second and third points defining the slope or tangent line for the curve at the first and last points.

<#5995#><#5995#>
<#1654#>sweptsph<#1654#> <#1655#>coeffs<#1655#> x0 x1 x2 x3 y0 y1 y2 y3 z0 z1 z2 z3 r0 r1 r2 r3
A second way to define the curve is to specify the coeffecients for the parametric equations that define the curve. This is specified as ``<#583#>coeffs<#583#> fx fy fz'' where each fn is a third order equation, c0 c1 c2 c3, where

#math168#

fn = c0 + c1x + c2x2 + c3x3

<#6021#><#6021#>
<#1658#>sweptsph<#1658#> [<#1659#>nbezier<#1659#> n0 n1 n2 n3] [<#1660#>ncoeffs<#1660#> cn0 cn1 cn2 cn3]
A third way is to use any combination of parametric bezier curves or function coeffs. These are specified as <#589#>nbezier<#589#> or <#590#>ncoeffs<#590#> where n is x, y, or z. These are followed by four numbers that are interpreted as the coeffecients for the parametric variable x, y, or z in the case of <#591#>ncoeffs<#591#> or as the bezier curve where the first number is the starting value, the last value is the ending value, and the second and third values define the ``speed'' at which the curve leaves the endpoints.

Hopefilly the following examples make this clearer:

verbatim51#

There are a few known bugs:

Other problems:

Using third order equations to define the center path or the radius requires solving a tenth order equation when checking for intersection. All roots over the interval (0, 1) must be found, not just the smallest. The root finder used was one that I wrote that uses a combination of Newton-Rasphson and bisection. It ends up being fairly slow and probably could use some speeding up. A few possibilities would be using Sturm sequences to find the number of roots over an interval (I tried this but my algorithm did not find all the roots and thus produced gaps in the surface. I plan on trying to fix it if I can) and to reduce the polynomial by dividing through by known roots before solving for remaining roots.

Any comments, bug reports, or suggestions for changes or improvements will be greatly appreciated.

This addition provided by Larry Coffin
<#600#>lcoffin@clciris.chem.umr.edu<#600#>